<template>
  <div @click="father">
    <a @click.prevent :href="url">阻止百度</a>
    <br>
    <button @click.stop="son">阻止冒泡</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      url: 'http://www.baidu.com'
    }
  },
  methods: {
    father() {
      console.log('爸爸被点击了');
    },
    son() {
      console.log('儿子被点击了');
    }
  }
}
</script>

<style>

</style>